/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUIComponents.Menu;

import MainClasses.main;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import javax.swing.*;
/**
 *
 * @author andrewcutler
 */
public class ModeMenu extends JMenu{

    
    public ModeMenu()
    {
        super("Mode");
        
        JMenuItem dailyView = new JMenuItem("Daily View");
        JMenuItem weeklyView = new JMenuItem("Weekly View");
        JMenuItem monthlyView = new JMenuItem("Monthly View");
        
        dailyView.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e)
            {
                main.getTabbedPane().setSelectedIndex(0);
            }
        });
        weeklyView.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e)
            {
                main.getTabbedPane().setSelectedIndex(1);
            }
        });
        monthlyView.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e)
            {
                main.getTabbedPane().setSelectedIndex(2);
            }
        });
        
        add(dailyView);
        add(weeklyView);
        add(monthlyView);
    }
}
